feat(core): add execution lifecycle and structured errors#35280
Closed
kitlangton wants to merge 5 commits into
Closed
feat(core): add execution lifecycle and structured errors#35280kitlangton wants to merge 5 commits into
kitlangton wants to merge 5 commits into
Conversation
e263664 to
5cbc1fc
Compare
Contributor
Author
|
Collapsed into #35272 so the Session event contract lands in one PR with one V2 history reset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #35016.
Summary
Replaces ambiguous V2 execution settlement and retry events with explicit lifecycle, bounded retries, and a closed structured error contract.
session.execution.started,.succeeded,.failed, and.interruptedevents.session.retry.scheduledand projects retry state into one Assistant across attempts.SessionStructuredErrorwire union with dot-casedtypediscriminators.content-filterto visible failed state instead of an empty successful Assistant.Execution lifecycle records are historical observations of one process-local coordinator busy period. They carry no execution identity, do not define transcript boundaries, and replay never implies current liveness or recovery.
/session/activeremains the current-liveness authority.Retry Policy
llm.streamcall remains one step and consumes the agent step allowance.Persistence
20260703210000_reset_v2_execution_errorsclears V2 events, sequences, projected messages, and admitted inputs. New durable contracts start at version 1.Verification
packages/client/test/contract-identity.test.tsremains a parent-branch baseline failure because the client package does not declare its test-only@opencode-ai/coredependency; the other client tests pass.